<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>今日特卖</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">

    <link href="css/plugins/jquery-confirm/jquery-confirm.min.css" rel="stylesheet">

    <!-- 全局js -->
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
    <script src="js/core.js"></script>
</head>
<body>

<h2 style="text-align: center">今日特卖</h2>
<div>
    <input  id="btn-manage" class="btn btn-blue" onclick="manageBuying()" type="button" value="去管理抢购">
    <input style="display: none" id="btn-add" class="btn btn-blue" onclick="goAddBuying()" type="button" value="去添加抢购">
</div>
<div class="ibox-content">
    <form class="form-horizontal m-t">
        <div class="form-group" id="add-div">
            <label class="col-sm-4 control-label">今日特卖时间段（选择后先保存）：</label>
            <div class="col-sm-4">
                <input id="todayRange" placeholder="选择开始、结束时间" class="form-control layer-date" readonly>
            </div>
            <input class="btn btn-default" onclick="saveCurDuration()" type="button" value="保存">
            <input class="btn btn-default" onclick="resetCurDuration()" type="button" value="重置">
            <input class="btn btn-default" onclick="continueAdd()" type="button" value="继续添加">
        </div>
        <div class="form-group" id="mng-div" style="display:none">
            <div style="float: left;margin: 0 5px 0 25px">
                <span>时间段筛选:</span>
            </div>
            <div style="float: left">
                <select id="curDuration" name="" class="form-control">
                    <!--    <optgroup data-id="" label="">
                        </optgroup>
                        <optgroup label="Group 2">
                            <option>Option 2.1</option>
                            <option>Option 2.2</option>
                        </optgroup>-->
                </select>
            </div>
            <div style="float: left">
                <input class="btn btn-default" onclick="delCurDuration()" type="button" value="删除所选整个时间段及商品">
            </div>
        </div>
    </form>
</div>

<div>
    <div class="btn-group hidden-xs" id="ExistBuyingToolbar" role="group">
        <h3>已添加的今日特卖商品(请务必添加或修改限时返现率和限购数量)</h3>
        <button type="button" class="btn btn-outline btn-default" onclick="rmFromExist()">
            <i class="glyphicon glyphicon-trash" aria-hidden="true">从当前列表移除</i>
        </button>
        <button type="button" class="btn btn-outline btn-default" onclick="saveFromExist()">
            <i class="glyphicon " aria-hidden="true">保存修改</i>
        </button>
    </div>
    <table id="exist-buying-goods" data-toolbar="#ExistBuyingToolbar"/>
</div>
<div>
    <div class="btn-group hidden-xs" id="addBuyingToolbar" role="group">
        <h3>可选商品列表</h3>
        <button type="button" class="btn btn-outline btn-default" onclick="addToList();">
            <i class="glyphicon glyphicon-plus" aria-hidden="true">添加到今日特卖</i>
        </button>
        <div style="float: left;margin: 0 5px 0 25px">
            <span>分组筛选:</span>
        </div>
        <div style="float: left">
            <select id="curGroup" name="" class="form-control">
                <!--    <optgroup data-id="" label="">
                    </optgroup>
                    <optgroup label="Group 2">
                        <option>Option 2.1</option>
                        <option>Option 2.2</option>
                    </optgroup>-->
            </select>
        </div>
    </div>
    <table id="add-buying-goods" data-toolbar="#addBuyingToolbar"></table>
</div>



<!--bootstrap-table-->
<script src="js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<!--alert-beautify-->
<script src="js/plugins/jquery-confirm/jquery-confirm.min.js"></script>
<!--自己加的美化alert、confirm配置-->
<script src="js/alert-beautify.js"></script>
<!-- layerDate plugin javascript -->
<script src="js/plugins/laydate/laydate.js"></script>

<script src="js/today_buying.js"></script>
</body>
</html>